import requests
import sys
import logging
from common import presignedUrl

# 正常情况日志级别使用INFO，需要定位时可以修改为DEBUG，此时SDK会打印和服务端的通信信息
logging.basicConfig(level=logging.INFO, stream=sys.stdout)


def getIdCardHeadImage(uuid):
    dir = "images/"
    key = dir + uuid + "_id_card_front.jpg"
    # 请求参数
    params = {
        "ci-process": "face-effect",
        "type": "face-segmentation",
    }
    url = presignedUrl.getPresignedUrl(key, "GET", params)

    print(url)
    # 使用URL
    # response = requests.get(url=url)
    return url
